﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace UtilsORM.MySqlData;

/// <summary>
/// 设备
/// </summary>
[Index("tf_task_guid", Name = "idxlcuguid")]
[Index("tf_guid", Name = "idxlguid")]
[Index("tf_execute_time", Name = "tf_execute_time")]
[Index("tf_status", Name = "tf_status")]
public partial class iot_device_task_time_fixed
{
    [Key]
    public long tf_id { get; set; }

    [Required]
    public string tf_guid { get; set; }

    /// <summary>
    /// 设备id
    /// </summary>
    [StringLength(50)]
    public string tf_task_guid { get; set; }

    /// <summary>
    /// 任务类型
    /// </summary>
    [StringLength(255)]
    public string tf_task_type { get; set; }

    /// <summary>
    /// 0正常，1无效
    /// </summary>
    public int tf_status { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    [StringLength(50)]
    public string tf_time_name { get; set; }

    /// <summary>
    /// 几点钟执行
    /// </summary>
    [StringLength(50)]
    public string tf_time_value { get; set; }

    /// <summary>
    /// 数值ss,0为不设置值
    /// </summary>
    [Column(TypeName = "datetime")]
    public DateTime? tf_start_time { get; set; }

    /// <summary>
    /// iot_device_command
    /// </summary>
    [StringLength(255)]
    public string tf_key { get; set; }

    /// <summary>
    /// iot_device_command
    /// </summary>
    [StringLength(255)]
    public string tf_value { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? tf_mod_time { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? tf_add_time { get; set; }

    /// <summary>
    /// 上次执行时间,默认值2000-01-01 00:00:00
    /// </summary>
    [Column(TypeName = "datetime")]
    public DateTime tf_execute_time { get; set; }

    [StringLength(100)]
    public string tf_c_guid { get; set; }

    /// <summary>
    /// 执行次数
    /// </summary>
    public int? tf_execute_count { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    [StringLength(255)]
    public string tf_title { get; set; }

    /// <summary>
    /// 0非模板，1模板
    /// </summary>
    public int? tf_is_template { get; set; }

    /// <summary>
    /// 产品
    /// </summary>
    [StringLength(50)]
    public string tf_p_guid { get; set; }

    /// <summary>
    /// 产品编号
    /// </summary>
    public int? tf_p_model_no { get; set; }

    /// <summary>
    /// 0启动，1不启动
    /// </summary>
    public int? tf_auto_run { get; set; }

    /// <summary>
    /// 0不参与自动配置，1参与自动配置
    /// </summary>
    public int? tf_auto_run_jion { get; set; }

    /// <summary>
    /// 0每天到点执行,1-每隔1天一次，2-每隔2天一次，每隔几日运行一次
    /// </summary>
    public int tf_interval_day { get; set; }
}
